Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>PureBasic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/PureBasic"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-PureBasic rootpage-PureBasic skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">PureBasic</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr"><p class="mw-empty-elt">
</p>
<table class="infobox_v2 infobox infobox--frwiki noarchive">
<tbody><tr>
<td colspan="2" class="entete informatique" style="background-color:#EEEEEE;color:black;">Purebasic<style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}


/* end https://fr.wikipedia.org/ */
</style>
</td></tr>

<tr><td colspan="3" style="text-align:center; line-height: 1.5em;"> </td></tr>
<tr>
<td colspan="2"><hr style="height:2px; color:inherit; background-color:#EEEEEE;"></td></tr>
<tr>
<th scope="row">Date de première version
</th>
<td>22 Octobre 2000
</td>
</tr>
<tr>
<th scope="row"><a href="Paradigme_(programmation)" title="Paradigme (programmation)">Paradigme</a>
</th>
<td>Impérative
</td>
</tr>
<tr>

<th scope="row">Auteur
</th>
<td>Fantaisie Software
</td>
</tr>
<tr>

<th scope="row">Développeur
</th>
<td>Frédéric Laboureur
</td>
</tr>
<tr>

<th scope="row"><a href="Version_d'un_logiciel" title="Version d'un logiciel">Dernière version</a>
</th>
<td>6.21 (le 9 juin 2025)
</td>
</tr>
<tr>




<th scope="row">Influencé par
</th>
<td><a href="BASIC" class="mw-redirect" title="BASIC">BASIC</a>
</td>
</tr>
<tr>



<th scope="row"><a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">Système d'exploitation</a>
</th>
<td><a href="Microsoft_Windows" title="Microsoft Windows">Windows</a>, <a href="Mac_OS" class="mw-redirect" title="Mac OS">Mac OS</a>, <a href="Linux" title="Linux">Linux</a>, <a href="Raspberry_Pi_OS" title="Raspberry Pi OS">Raspberry Pi OS</a>, (<a href="AmigaOS" title="AmigaOS">AmigaOS</a> abandonnée et maintenant open source)
</td>
</tr>
<tr>

<th scope="row"><a href="Licence_de_logiciel" title="Licence de logiciel">Licence</a>
</th>
<td><a href="Logiciel_propri%C3%A9taire" title="Logiciel propriétaire">Logiciel propriétaire</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Site_web" title="Site web">Site web</a>
</th>
<td><a rel="nofollow" class="external free" href="http://www.purebasic.com">http://www.purebasic.com</a>
</td>
</tr>
<tr>
<th scope="row"><a href="Extension_de_nom_de_fichier" title="Extension de nom de fichier">Extensions de fichiers</a>
</th>
<td>.pb .pbf .pbi .pbp
</td>
</tr>
<tr>

</tr>
</tbody></table>
<p><b>PureBasic</b> est un <a href="Langage_de_programmation" title="Langage de programmation">langage de programmation</a> de type <a href="BASIC" class="mw-redirect" title="BASIC">BASIC</a> compilé.
</p><p>Plusieurs points le caractérisent&nbsp;:
</p>
<ul><li>simplicité&nbsp;: la syntaxe <a href="BASIC" class="mw-redirect" title="BASIC">BASIC</a> est simple à apprendre&nbsp;;</li>
<li>rapidité&nbsp;: les applications produites sont optimisées (taille réduite) et rapides&nbsp;;</li>
<li>portabilité&nbsp;: le <a href="Code_source" title="Code source">code source</a> est portable d'un <a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">système d'exploitation</a> à l'autre. Il existe une version de PureBasic pour <a href="Linux" title="Linux">Linux</a>, <a href="Microsoft_Windows" title="Microsoft Windows">Windows</a> (x86, <a href="X64" title="X64">x64</a>, Intel et ARM), <a href="AmigaOS" title="AmigaOS">AmigaOS</a>, <a href="Mac_OS" class="mw-redirect" title="Mac OS">Mac OS</a> (x64 et M1), Raspberry (arm32, arm64)</li>
<li>sans <a href="D%C3%A9pendance_logicielle" class="mw-redirect" title="Dépendance logicielle">dépendances logicielles</a>&nbsp;: le langage ainsi que les applications ne nécessitent pas d'installation obligatoire, il est donc aisé de le transporter sur une <a href="Cl%C3%A9_USB" title="Clé USB">clé USB</a>, et d'exécuter les applications sous forme <a href="Application_portable" title="Application portable">d'applications portables</a>&nbsp;;</li>
<li>création de fichiers <a href="Dynamic_Link_Library" title="Dynamic Link Library">DLL</a>&nbsp;: la création de DLL standard (Non <a href="ActiveX" title="ActiveX">ActiveX</a>, utilisable dans n'importe quel autre langage) est aussi aisée que la création d'EXE&nbsp;;</li>
<li>prix&nbsp;: les <a href="Mise_%C3%A0_niveau" class="mw-redirect" title="Mise à niveau">mises à niveau</a> sont gratuites à vie.</li>
<li>Depuis la version 6.00 (juin 2022), en plus de la compilation utilisant l'ASM, PureBasic propose la compilation avec un <a href="Backend" title="Backend">Backend</a> C. Ce dernier permet d’accéder à des nouvelles plateformes (ex: Raspberry) et doit faciliter l'ajout futur de nouvelles librairies.</li></ul>
<p>PureBasic possède un jeu de commandes étendues (plus de 1&nbsp;600&nbsp;commandes internes) auxquelles s'ajoute un accès simplifié à une grande partie de l'<a href="Interface_de_programmation" title="Interface de programmation">API</a> du système d'exploitation. Le programmeur peut appeler les commandes de l'<a href="Interface_de_programmation" title="Interface de programmation">API</a> de Windows, de Linux ou Mac OS directement comme s'il s'agissait des commandes internes à PureBasic, sans avoir à les déclarer au préalable (ainsi que les constantes). Rien de mieux qu'un exemple pratique pour illustrer ceci. Comparons un programme simple en <a href="Visual_Basic" title="Visual Basic">Visual Basic</a> avec son équivalent en PureBasic&nbsp;: comment obtenir le chemin du <a href="R%C3%A9pertoire_(informatique)" title="Répertoire (informatique)">répertoire</a> Windows.
</p>
<dl><dd><b>Visual Basic&nbsp;:</b></dd></dl>
<pre>Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
Const MAX_PATH = 260
strWindowsDirectory$ = Space$(MAX_PATH)
lngReturn&amp; = GetWindowsDirectory(strWindowsDirectory$, MAX_PATH)
</pre>
<dl><dd><b>PureBasic&nbsp;:</b></dd></dl>
<pre>strWindowsDirectory$ = Space(#MAX_PATH)
lngReturn = GetWindowsDirectory_(strWindowsDirectory$, #MAX_PATH)
</pre>

<div class="mw-heading mw-heading2"><h2 id="Description">Description</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Caractéristiques"><span id="Caract.C3.A9ristiques"></span>Caractéristiques</h3></div>
<p>PureBasic gère de nombreux <a href="Type_(informatique)" title="Type (informatique)">types</a>&nbsp;:
</p>
<div style="column-width:20em;column-gap:1em;" class="colonnes">
<ul><li>Ascii (.a)</li>
<li>Byte (.b)</li>
<li>Char (.c)</li>
<li>Double (.d)</li>
<li>Float (.f)</li>
<li>Integer (.i)</li>
<li>Long (.l)</li>
<li>Quad (.q)</li>
<li>String (.s)</li>
<li>Unicode(.u)</li>
<li>Word (.w)</li>
<li>Structures définies par l'utilisateur</li></ul>
</div>
<p>PureBasic supporte de nombreuses fonctionnalités&nbsp;:
</p>
<ul><li>Support de l'<a href="Unicode" title="Unicode">Unicode</a></li>
<li>Support du <a href="Thread_safety" title="Thread safety">Thread-Safe</a></li>
<li>Support du 64-bit (Windows, Linux, Mac OS, Raspberry)</li>
<li>Support de différents processeurs (<a href="X86" title="X86">x86</a>, x64, <a href="PowerPC" title="PowerPC">PowerPC</a>, ARM)
<ul><li><a href="3DNow!" title="3DNow!">3DNow!</a>/<a href="MMX_(jeu_d'instructions)" class="mw-redirect" title="MMX (jeu d'instructions)">MMX</a>/SSE/<a href="SSE2" class="mw-redirect" title="SSE2">SSE2</a></li></ul></li>
<li>Support de l'assembleur inline (Assembleur de type <a href="FASM" title="FASM">FASM</a> (Windows et Linux) et <a href="Netwide_Assembler" title="Netwide Assembler">NASM</a> (MacOs))</li>
<li>Support de différents <a href="Interface_de_programmation" title="Interface de programmation">API</a>
<ul><li>Windows&nbsp;: Win32</li>
<li>Linux&nbsp;: GTK+, <a href="OpenGL" title="OpenGL">OpenGL</a>, SDL, LibC</li>
<li>MacOS&nbsp;: Carbon, Cocoa</li>
<li>Tous&nbsp;: LibXML</li></ul></li>
<li>Spécifique à Windows
<ul><li>Support des thèmes pour Windows XP</li>
<li>Support de l'<a href="User_Account_Control" title="User Account Control">UAC</a> de Windows Vista</li></ul></li></ul>
<p>PureBasic permet de créer&nbsp;:
</p>
<ul><li>Windows
<ul><li>Exécutables (.exe) de type <b>GUI</b> ou <b>Console</b></li>
<li>DLLs (.dll)</li>
<li>UserLibraries via un outil externe&nbsp;: Tailbite ou Moebius</li>
<li>Import Libraries (.lib) via un outil externe</li></ul></li>
<li>Linux
<ul><li>Exécutables de type <b>GUI</b> ou <b>Console</b></li>
<li>Shared Libraries (.so)</li></ul></li>
<li>MacOS
<ul><li>Exécutables de type <b>GUI</b> ou <b>Console</b></li>
<li>Shared Libraries (<a href="Mach-O" title="Mach-O">.dylib</a>)</li></ul></li></ul>
<div class="mw-heading mw-heading3"><h3 id="Bibliothèques"><span id="Biblioth.C3.A8ques"></span>Bibliothèques</h3></div>
<p>Pour information, voici la liste officielle des bibliothèques PureBasic&nbsp;:
</p>
<dl><dd><b>Bibliothèques générales</b></dd></dl>
<dl><dd><dl><dd>2D Drawing, CDAudio, Cipher, Clipboard, Console, Database (<a href="SQLite" title="SQLite">SQLite</a> et <a href="PostgreSQL" title="PostgreSQL">PostgreSQL</a>, MySQL/MariaDB), Date, Desktop, DragDrop, File, FileSystem, Font, Gadget, Help, Image, JSON, ImagePlugin, Library, Linked List, Math, Memory, Menu, Misc, Movie, Network, OnError, Packer, Preference, Process, Printer, Requester, Scintilla, Sort, StatusBar, String, SysTray, Thread, Toolbar, VectorDrawing, Window, <a href="Extensible_Markup_Language" title="Extensible Markup Language">XML</a>, Regular Expression, DPI aware support, WebService API (REST)</dd></dl></dd></dl>
<dl><dd><b>Bibliothèques pour les jeux 2D</b></dd></dl>
<dl><dd><dl><dd>Joystick, Keyboard, Module, Mouse, Palette, Sprite &amp; Screen, Sprite3D, Sound, SoundPlugin</dd></dl></dd></dl>
<dl><dd><b>Bibliothèques pour les jeux 3D </b></dd></dl>
<dl><dd><dl><dd>Engine3D, Billboard, Camera, Entity, Gadget3D, Joint, Light, Material, Mesh, Node, Node Animation, Particle,</dd>
<dd>Sound3D, Special Effect, <a href="Spline" title="Spline">Spline</a>, Static Geometry, Terrain, Texture, Vertext Animation, Window3D</dd></dl></dd></dl>
<p>Vous pouvez bien sûr créer vos propres bibliothèques en <a href="C_(langage)" title="C (langage)">langage C</a> ou en assembleur, ou encore directement en PureBasic grâce à un utilitaire ("Tailbite") développé par un utilisateur de PureBasic<sup id="cite_ref-inicia_tailbite_2-0" class="reference"><a href="#cite_note-inicia_tailbite-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Exemples">Exemples</h3></div>
<p>Cette simple ligne de code PureBasic créera un exécutable autonome minuscule de <span class="nowrap">4,50 <a href="Octet" title="Octet">ko</a></span> (4&nbsp;608&nbsp;octets) pour Windows.
</p>
<pre>MessageRequester("", "<a href="Hello_world" title="Hello world">Hello World</a>")
</pre>
<p>Ce qui suit est un court exemple d'un programme fonctionnel avec PureBasic. La somme des nombres saisis par l'utilisateur est affichée automatiquement. Ce programme montre comment créer une fenêtre, des gadgets supplémentaires, ainsi que la gestion des événements et un calcul mathématique simple. Ce code compile dans un exécutable autonome de 14,5 ko (14 848 octets) qui peut être utilisé sur n'importe quel PC équipé de Windows 95 au serveur 2003 de Windows en passant par <span class="nowrap"><a href="Windows_XP" title="Windows XP">Windows XP</a></span>, Vista et <span class="nowrap"><a href="Windows_7" title="Windows 7">Windows 7</a></span>.
</p>
<pre> OpenWindow(1, 300, 300, 100, 100, "Title")
StringGadget(1, 10, 10, 50, 20, "")
StringGadget(2, 10, 40, 50, 20, "")
TextGadget(3, 80, 30, 50, 20, "")
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
FirstValue = Val(GetGadgetText(1))
SecondValue = Val(GetGadgetText(2))
SetGadgetText(3, Str(FirstValue + SecondValue))
EndIf
Until Event = #PB_Event_CloseWindow
</pre>
<div class="mw-heading mw-heading2"><h2 id="Outils">Outils</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Moebius">Moebius</h3></div>
<p>Moebius est un outil <a href="Open_source" title="Open source">open source</a> créé par Progi1984 qui permet de créer à partir de code Purebasic une userlib, sous Windows et Linux<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Tailbite">Tailbite</h3></div>
<p>Tailbite est un outil créé par ElChoni qui permet de créer à partir de code Purebasic une userlib, uniquement sous Windows<sup id="cite_ref-inicia_tailbite_2-1" class="reference"><a href="#cite_note-inicia_tailbite-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Visual_designer">Visual designer</h3></div>
<p>L'éditeur visuel de PureBasic (<i>Form Designer</i>) (concepteur d'interfaces graphiques utilisateur) a été créé pour le langage de programmation PureBasic et est bien sûr développé en PureBasic. Le Visual Designer a été remplacé en 2013 par une nouvelle version et nommé Form Designer.
</p>
<div class="mw-heading mw-heading3"><h3 id="MADLib">MADLib</h3></div>
<p>MADLib est une bibliothèque (UserLib) de fonctions, pour PureBasic. Elle a été compilée par l'utilitaire Tailbite, développé par MAD<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Références"><span id="R.C3.A9f.C3.A9rences"></span>Références</h2></div>
<div class="references-small decimal" style=""><div class="mw-references-wrap"><ol class="references">
<li id="cite_note-wikidata-d8a3aed454eb77cac28ca2af8a6ceb519d64d91b-1"><span class="reference-text"><span class="ouvrage">«&nbsp;<a rel="nofollow" class="external text" href="https://www.purebasic.com/news.php"><cite style="font-style:normal;">https://www.purebasic.com/news.php</cite></a>&nbsp;»</span></span>
</li>
<li id="cite_note-inicia_tailbite-2"><span class="reference-text"><span class="ouvrage"><span class="noarchive">«&nbsp;<a rel="nofollow" class="external text" href="http://inicia.es/de/elchoni/TailBite/"><cite style="font-style:normal; color:var(--color-link-red, #d73333);">inicia.es/de/elchoni/TailBite/</cite></a>&nbsp;»<sup class="">(<a rel="nofollow" class="external text" href="https://web.archive.org/web/*/http://inicia.es/de/elchoni/TailBite/">Archive.org</a> • <a rel="nofollow" class="external text" href="https://archive.wikiwix.com/cache/?url=http://inicia.es/de/elchoni/TailBite/">Wikiwix</a> • <a rel="nofollow" class="external text" href="https://archive.is/http://inicia.es/de/elchoni/TailBite/">Archive.is</a> • <a rel="nofollow" class="external text" href="https://webcache.googleusercontent.com/search?hl=fr&amp;q=cache:http://inicia.es/de/elchoni/TailBite/">Google</a> • Que faire&nbsp;?)</sup></span></span>.</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> «&nbsp;<a rel="nofollow" class="external text" href="https://github.com/Progi1984/Moebius"><cite style="font-style:normal;" lang="en">Progi1984/Moebius</cite></a>&nbsp;», sur <span class="italique">GitHub</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2020-09-22" data-sort-value="2020-09-22">22 septembre 2020</time>)</small></span>.</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> «&nbsp;<a rel="nofollow" class="external text" href="http://sourceforge.net/projects/madlibforpb/"><cite style="font-style:normal;" lang="en">MadLib for PureBasic</cite></a>&nbsp;», sur <span class="italique">SourceForge</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2020-09-22" data-sort-value="2020-09-22">22 septembre 2020</time>)</small></span>.</span>
</li>
</ol></div>
</div>
<div class="mw-heading mw-heading2"><h2 id="Liens_externes">Liens externes</h2></div>
<ul><li>PureBasic&nbsp;: <a rel="nofollow" class="external text" href="http://www.purebasic.com/">site web officiel</a> et <a rel="nofollow" class="external text" href="https://www.purebasic.com/french/documentation/index.html">aide en ligne</a></li>
<li>Le Blog PureBasic (en anglais) - <a rel="nofollow" class="external text" href="https://www.purebasic.fr/blog/">PureBasic Team Blog</a> - «&nbsp;<i>Random thoughts on PureBasic development</i>&nbsp;»</li>
<li>Forums officiels&nbsp;: <a rel="nofollow" class="external text" href="http://www.purebasic.fr/french/index.php">en français</a>, <a rel="nofollow" class="external text" href="http://www.purebasic.fr/english/index.php">en anglais</a>, <a rel="nofollow" class="external text" href="http://www.pure-board.de/">en allemand</a></li>
<li><a rel="nofollow" class="external text" href="http://comtois.developpez.com/tutoriels/purebasic/presentation/">Article présentant PureBasic</a> (2012)</li></ul>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de la programmation informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2025-06-26" href="https://fr.wikipedia.org/wiki/?title=PureBasic&amp;oldid=226803092">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>